import React, { Suspense } from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import Router from "./router";
import { Provider } from "react-redux";
import store, { persistor } from "./store";
import { PersistGate } from "redux-persist/integration/react";
const root = ReactDOM.createRoot(
  document.getElementById("root") as HTMLElement
);

root.render(
  <React.StrictMode>
    <Provider store={store}>
      <PersistGate loading={null} persistor={persistor}>
        <Suspense fallback={""}>
          <Router></Router>
        </Suspense>
      </PersistGate>
    </Provider>
  </React.StrictMode>
);
